/**
 * @description
 */

const mongoose = require("mongoose");

const url = "mongodb://localhost:27017";

const dbName = "jingdongserver";

mongoose.connect(`${url}/${dbName}`).then(() => {
  console.log("db connection");
});

const conn = mongoose.connection;
conn.on("error", (err) => {
  console.log(err);
});

module.exports = mongoose;
